package com.lagou.task18;

public class RunnableIdNameTest implements Runnable{
    @Override
    public void run() {
        Thread t1 = Thread.currentThread();
        System.out.println("子线程的编号= " + t1.getId() + " 名字=" + t1.getName());
    }

    public static void main(String[] args) {
        new Thread(new RunnableIdNameTest()).start();
        Thread t1 = Thread.currentThread();
        System.out.println("zhu线程的编号= " + t1.getId() + " 名字=" + t1.getName());
    }
}
